
<template>
  <div id="app">
    <!-- <h1>版本号:{{ version }}</h1>
    <div class="carts"
      v-if="env==='development'">
      <Products />
      <hr>
      <Carts />
    </div>
    <Comment v-else /> -->
    <selectCom/>
  </div>
</template>

<script>
// 需求:

// 1.yarn serve的时候 展示的是购物车页面

// 2.yarn comment 展示评论的页面

// 3.评论页面的端口设置为6666

import Products from "./components/products";
import Carts from "./components/carts";
import Comment from "./components/comment";
import selectCom from "./components/select";
export default {
  name: "App",
  data() {
    return {
      version: "",
      env:"",
    };
  },
  components: {
    Products,
    Carts,
    Comment,
    selectCom
  },
  created() {
    console.log(process.env);
    this.version = process.env.VUE_APP_VERSION;
    this.env = process.env.NODE_ENV;
  },
  // mounted() {
  //   console.log(process.env);
  //   this.version = process.env.VUE_APP_VERSION;
  // },
};
</script>